package com.hckjsec.system.service.impl;

import java.util.List;

import com.hckjsec.common.utils.uuid.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hckjsec.system.mapper.WorkOaCwaMapper;
import com.hckjsec.system.domain.WorkOaCwa;
import com.hckjsec.system.service.IWorkOaCwaService;

/**
 * 考勤主Service业务层处理
 * 
 * @author cyt
 * @date 2021-06-26
 */
@Service
public class WorkOaCwaServiceImpl implements IWorkOaCwaService 
{
    @Autowired
    private WorkOaCwaMapper workOaCwaMapper;

    @Autowired
    private IdWorker idWorker;
    /**
     * 查询考勤主
     * 
     * @param cwaId 考勤主ID
     * @return 考勤主
     */
    @Override
    public WorkOaCwa selectWorkOaCwaById(Long cwaId)
    {
        return workOaCwaMapper.selectWorkOaCwaById(cwaId);
    }

    /**
     * 查询考勤主列表
     * 
     * @param workOaCwa 考勤主
     * @return 考勤主
     */
    @Override
    public List<WorkOaCwa> selectWorkOaCwaList(WorkOaCwa workOaCwa)
    {
        return workOaCwaMapper.selectWorkOaCwaList(workOaCwa);
    }

    /**
     * 新增考勤主
     * 
     * @param workOaCwa 考勤主
     * @return 结果
     */
    @Override
    public int insertWorkOaCwa(WorkOaCwa workOaCwa)
    {
        return workOaCwaMapper.insertWorkOaCwa(workOaCwa);
    }

    /**
     * 修改考勤主
     * 
     * @param workOaCwa 考勤主
     * @return 结果
     */
    @Override
    public int updateWorkOaCwa(WorkOaCwa workOaCwa)
    {
        return workOaCwaMapper.updateWorkOaCwa(workOaCwa);
    }

    /**
     * 批量删除考勤主
     * 
     * @param cwaIds 需要删除的考勤主ID
     * @return 结果
     */
    @Override
    public int deleteWorkOaCwaByIds(Long[] cwaIds)
    {
        return workOaCwaMapper.deleteWorkOaCwaByIds(cwaIds);
    }

    /**
     * 删除考勤主信息
     * 
     * @param cwaId 考勤主ID
     * @return 结果
     */
    @Override
    public int deleteWorkOaCwaById(Long cwaId)
    {
        return workOaCwaMapper.deleteWorkOaCwaById(cwaId);
    }
}
